1. Field of the Invention
This invention relates generally to computer systems, and more particularly to booting processes associated with a drive of a computer and methods for booting to a selected partition of the drive.
2. Description of the Related Art
Computer systems commonly have a hard disk drive on which an operating system (OS) is stored. The OS, as is well known, provides the necessary functionality to enable processing of basic computer routines as well as render software applications with specific OS functionality. Although the OS is designed to be robust, many times errors occur that cause the OS to stop functioning as intended. This type of problem is often referred to as a computer crash, and the computer crash can be the result of any number or reasons. Such reasons include, for example, computer viruses, miscommunication between programs, improper shutdowns, power surges, etc. In any even, when such a crash occurs, the computer system may not be able to reboot from the resident OS.
When such crashes occur, the computer user is generally required obtain professional help in order to diagnose the problem and then attempt a solution. Since computer users often store valuable information on their drive, users are routinely forced to attend to many hours of down-time until the drive is repaired and data is recovered (assuming a prior backup was recent enough to be of help).
In view of the foregoing, there is a need for methods that enable computer systems to remain operational from the same hard disk drive while repairs are made to the original OS.
Broadly speaking, the present invention fills these needs by providing methods that enable booting from a copy operating system (OS) stored in a different partition so a single hard disk drive can have two copies of OS in different partitions to be selected to boot from. In a preferred embodiment, a single hard disk drive is provided with at least two partitions. An original OS is provided in one of the partitions and a copy OS is provided in another partition. In order to keep the OS functioning under one same circumstance, only one OS partition should be seen at a time. When the computer system is operational using the original OS, e.g., using an original boot partition, the partition having the copy OS is not visible to the computer user. When the computer is rebooted using the copy OS, e.g., using a Rezoom partition, the original boot partition will not be visible to the computer user. Thus, the user can continue to work uninterrupted using the Rezoom partition as if the Rezoom partition were the original boot partition. It should be appreciated that the present invention can be implemented in numerous ways, including as a process, an apparatus, a system, a device, a method, or a computer readable medium. Several inventive embodiments of the present invention are described below.
In one embodiment, a method for selecting a boot partition from a single drive of a computer is disclosed. The method includes receiving a boot request and accessing a signature sector of the single drive to ascertain a first serial number for a first boot partition and a second serial number for a second boot partition. The method then proceeds to scanning the single drive to identify the first boot partition by the first serial number and identify the second boot partition by the second serial number. A selection window requesting user selection of either the first boot partition or the second boot partition is then generated. The method then proceeds to modifying a boot flag in the partition table of the single drive in response to the user selection, and the modifying of the boot flag is configured to identify one of the two OS partitions as a partition containing an operating system for booting the computer. In a preferred implementation, the method further includes hiding a non-selected partition. The non-selected partition is one of the first boot partition and the second boot partition.
In another embodiment, a method for hiding a partition of a single drive connected to a computer is disclosed. The method includes writing a master boot record (MBR) having a boot select code to the single drive. A signature sector (SS) is then written to the single drive. The signature sector having a first serial number for an original boot partition and a second serial number for a backup boot partition. Then, one of the first serial number and the second serial number is written to an active partition field of the signature sector. The serial number to be written to the active partition field defining a user selected boot partition which can be one of the original boot partition and the backup boot partition. The method then includes booting to the user selected boot partition, and the booting is configured to hide one of the original boot partition and the backup partition which is not the user selected boot partition.
In yet a further embodiment, a computer readable media having program instructions for selecting a boot partition from a single drive of a computer is disclosed. The computer readable media includes: (a) program instructions for receiving a boot request; (b) program instructions for accessing a signature sector of the single drive to ascertain a first serial number for a first boot partition and a second serial number for a second boot partition; (c) program instructions for scanning the single drive to identify the first boot partition by the first serial number and identify the second boot partition by the second serial number; (d) program instructions for generating a selection window requesting user selection of either the first boot partition or the second boot partition; and (e) program instructions for modifying a boot flag of the single drive in response to the user selection. The modifying of the boot flag is configured to identify one of the first boot partition and the second boot partition as a partition containing an operating system for booting the computer.
The advantages of the present invention are numerous. Most notably, the ability to boot form another partition of the same hard disk drive provides users with the ability to continue working uninterrupted after a failure to, for example, the OS stored in the original boot partition. Yet another advantage is that users will be presented with a seamless appearance of the drive letter arrangement. For instance, if the partition having a copy of the OS (e.g., the Rezoom partition) is not being used to run the computer, it is hidden from the user""s view and all drive letters are presented in proper sequential order after the hiding. In the same manner, if the Rezoom partition is running the computer, the original partition containing the failed OS will be hidden from the user""s view when the computer is in use. In this case, the original boot partition will be hidden and the drive letter of the original boot partition (e.g., C) will be assigned to the Rezoom partition. Thus, the ability to select boot partitions, the hiding of non-selected partitions and drive letter mapping provide a powerful solution that will enable busy people to continue working uninterrupted by a computer failure. Such failures can then be addressed at a later time.
Other aspects and advantages of the invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.